package com.gopay.common.domain.ptbank;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

/**
 * Entity: G商融通平台参数配置表
 */
@Entity
@Table(name = "GSRT_BANK_PLAT_PARAM")
public class GsrtPlatParam implements java.io.Serializable {

	private static final long serialVersionUID = 1L;

	/**
	 * ID
	 */
	private Long id;

	/** 
	 * 乐观锁版本号
	 */
	private Long version;
	/**
	 * 银行平台ID
	 */
	private String platId;
	/**
	 * 预收金额
	 */
	private BigDecimal prePaymoney;
	/**
	 * 预收额度
	 */
	private BigDecimal prePayQuota;
	/**
	 * 是否已收到
	 */
	private String prePayFlag;
	/**
	 * 托管费率
	 */
	private BigDecimal trustRate;
	/**
	 * 封顶值
	 */
	private BigDecimal ojtCap;
	/**
	 * 托管专户
	 */
	private String cgAcctNo;
	/**
	 * 风险准备金专户
	 */
	private String fxAcctNo;
	/**
	 * 平台状态参数已设置
	 */
	private String platStat;
	/** 
	 * 创建时间
	 */
	private Date createdTs;
	/** 
	 * 记录最后修改时间
	 */
	private Date lastUpdTs;
	/**
	 * 备注
	 */
	private String remark;
	
	
	@Id
	@SequenceGenerator(name = "GsrtPlatParamSequence", sequenceName = "GSRT_BANK_PLAT_PARAM_SEQ")
	@GeneratedValue(generator = "GsrtPlatParamSequence", strategy = GenerationType.SEQUENCE)
	@Column(name = "ID", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Version
	@Column(name = "VERSION",nullable = true)
	public Long getVersion() {
		return this.version;
	}

	public void setVersion(Long version) {
		this.version = version;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this, ToStringStyle.DEFAULT_STYLE);
	}
	@Column(name = "PLATID", nullable = false, length=32)
	public String getPlatId() {
		return platId;
	}

	public void setPlatId(String platId) {
		this.platId = platId;
	}
	@Column(name = "PREPAYMONEY", nullable = true,precision=2,length=16)
	public BigDecimal getPrePaymoney() {
		return prePaymoney;
	}

	public void setPrePaymoney(BigDecimal prePaymoney) {
		this.prePaymoney = prePaymoney;
	}
	@Column(name = "PREPAYQUOTA", nullable = true,precision=2,length=16)
	public BigDecimal getPrePayQuota() {
		return prePayQuota;
	}

	public void setPrePayQuota(BigDecimal prePayQuota) {
		this.prePayQuota = prePayQuota;
	}
	@Column(name = "TRUSTRATE", nullable = false,precision=5,length=16)
	public BigDecimal getTrustRate() {
		return trustRate;
	}

	public void setTrustRate(BigDecimal trustRate) {
		this.trustRate = trustRate;
	}
	@Column(name = "OJTCAP", nullable = true,precision=2,length=16)
	public BigDecimal getOjtCap() {
		return ojtCap;
	}

	public void setOjtCap(BigDecimal ojtCap) {
		this.ojtCap = ojtCap;
	}
	@Column(name = "CGACCTNO", nullable = true,length=20)
	public String getCgAcctNo() {
		return cgAcctNo;
	}

	public void setCgAcctNo(String cgAcctNo) {
		this.cgAcctNo = cgAcctNo;
	}
	@Column(name = "FXACCTNO", nullable = true,length=20)
	public String getFxAcctNo() {
		return fxAcctNo;
	}

	public void setFxAcctNo(String fxAcctNo) {
		this.fxAcctNo = fxAcctNo;
	}
	@Column(name = "CREATED_TS", nullable = true)
	@Temporal(TemporalType.TIMESTAMP)
	public Date getCreatedTs() {
		return createdTs;
	}

	public void setCreatedTs(Date createdTs) {
		this.createdTs = createdTs;
	}
	@Column(name = "LAST_UPD_TS", nullable = true)
	@Temporal(TemporalType.TIMESTAMP)
	public Date getLastUpdTs() {
		return lastUpdTs;
	}

	public void setLastUpdTs(Date lastUpdTs) {
		this.lastUpdTs = lastUpdTs;
	}
	@Column(name = "REMARK", nullable = true)
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}
	@Column(name = "PREPAYFLAG", nullable = true)
	public String getPrePayFlag() {
		return prePayFlag;
	}

	public void setPrePayFlag(String prePayFlag) {
		this.prePayFlag = prePayFlag;
	}
	@Column(name = "PLATSTAT", nullable = true)
	public String getPlatStat() {
		return platStat;
	}

	public void setPlatStat(String platStat) {
		this.platStat = platStat;
	}

}
